<template>
  <div>
    <div>
      <el-radio-group v-model="radio">
        <el-radio label="1">点检打印</el-radio>
        <!-- <el-radio label="2">整改回执单</el-radio> -->
        <!-- <el-radio :label="9">备选项</el-radio> -->
      </el-radio-group>
    </div>
    <div style="height:600px;margin: 30px" v-if="radio==1">
      <el-form :model="queryParams" ref="queryForm">
        <el-col :span="12">
          <el-form-item label="检查人" prop="roleName">
            <el-input
              v-model="queryParams.roleName"
              placeholder="请输入"
              clearable
              style="width: 240px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="设备编号" prop="roleKey">
            <el-input
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              style="width: 240px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="点检顺序" prop="roleKey">
            <el-select
              v-model="queryParams.status"
              placeholder="请选择"
              clearable
              style="width: 240px"
            >
              <el-option
                v-for="dict in dict.type.sys_normal_disable"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="点检类型" prop="roleKey">
            <el-select
              v-model="queryParams.status"
              placeholder="请选择"
              clearable
              style="width: 240px"
            >
              <el-option
                v-for="dict in dict.type.sys_normal_disable"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
        </el-col>

        <el-table :data="tableData" style="width: 100%">
          <el-table-column prop="name" label="检查项目"></el-table-column>
          <el-table-column prop="address" label="检查标准"></el-table-column>
          <el-table-column prop="address" label="检查结果"></el-table-column>
        </el-table>
        <el-form-item label="问题描述" prop="roleName">
          <el-input
            type="textarea"
            v-model="queryParams.roleName"
            placeholder="请输入"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="处理结果" prop="roleName">
          <el-input
            type="textarea"
            v-model="queryParams.roleName"
            placeholder="请输入"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
      </el-form>
    </div>

    <div class="bt" style="text-align: center !important;">
      <el-button type="primary" @click="submitForm('queryForm')" v-if="isCreate!=2">打印</el-button>
      <el-button style="width:100px" @click="close">取消</el-button>
    </div>
  </div>
</template>
<script>
export default {
  dicts: ["sys_normal_disable"],
  data() {
    return {
      radio: "1",
      queryParams: {},
      checkList: [],
      tableData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄"
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1517 弄"
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1519 弄"
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1516 弄"
        }
      ]
    };
  },
  mounted() {
    this.$refs["queryForm"].resetFields();
  },
  methods: {
    submitForm() {
      console.log(queryParams, "queryParams");
    },
    close() {
      this.$emit("close");
    }
  }
};
</script>